package com.cooper.dao.admin;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.Insert;
import net.paoding.rose.jade.annotation.ReturnGeneratedKeys;
import net.paoding.rose.jade.annotation.SQL;

import com.cooper.entity.InvitationEntity;

@DAO
public interface InvitationDAO {
	
	static final String TABLE_NAME = "d_invitation";
	
	@ReturnGeneratedKeys
	@Insert(tableName=TABLE_NAME)
	Long saveEntity(InvitationEntity entity) throws Exception;
	
	@SQL("select count(*) TOTAL from d_invitation where deleted='n' and invitation_code=:1 ")
	int queryCount(String code) throws Exception;

}
